package vip.mall.common.enums;

import lombok.*;

/**
 * @author ASUS
 * @Date 2025/2/13 10:38
 * @Descripition 请求状态码
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum CommonResponseCode {
    SUCCESS(200,"成功"),
    FAIL(400,"失败"),
    NOT_FOUND(404,"请求资源未找到"),
    UNAUTHORIZED(401,"未授权"),
    FORBIDDEN(403,"禁止访问"),
    METHOD_NOT_ALLOWED(405,"请求方法不允许"),
    NOT_ACCEPTABLE(406,"请求头信息不匹配"),
    REQUEST_TIMEOUT(408,"请求超时"),
    TOO_MANY_REQUESTS(429,"请求次数过多"),
    REQUEST_ENTITY_TOO_LARGE(413,"请求体过大"),
    REQUEST_PARAMS_VALIDATION_ERROR(422,"请求参数校验错误"),
    ERROR(500,"服务器异常");
    private Integer code;
    private String message;
}
